import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home.vue'),
    children:[
      {
        path: '/era',
        name: 'era',
        component: () => import('../views/er/era.vue')
      },
      {
        path: '/erc',
        name: 'erc',
        component: () => import('../views/er/erc.vue')
      },
    ]
  },
  {
    path: '/phone',
    name: 'phone',
    component: () => import('../views/phone.vue')
  },
  {
    path: '/shop',
    name: 'shop',
    component: () => import('../views/shop.vue')
  },
  {
    path: '/user',
    name: 'user',
    component: () => import('../views/user.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
